<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>系统后台</title>
<script type="text/javascript" src="images/jquery-1.4.2.min.js"></script>
<style type="text/css">
<!--
body,td,th {FONT-SIZE:14px;color:#444444;FONT-FAMILY:"Microsoft Yahei",Tahoma,Arial,Helvetica,STHeiti;padding:0; margin:0;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,input,button,p,th,td{margin:0;padding:0;}
body {margin-left: 0px;margin-top:0px;margin-right: 0px;margin-bottom:0px;padding-left:0px;text-align:left; padding:0; margin:0; background-color:#EEEEEE}
IMG {BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px}
a,img{border:0;}
:focus{outline:0 none}
.mdiv1{width:100%; padding:0;margin:0 auto;background-color:#2E8BD0;overflow:hidden;}
.mdiv2{width:500px;padding:0;margin:0 auto; height:60px;}
.mdiv2a{float:left;width:500px;height:60px; line-height:60px; background-color:#efefef; margin-top:170px;FILTER: alpha(opacity =10);background-color:rgba(0,0,0,0.1);border-radius:5px;}
.mdiv2a_1{float:left;width:300px;height:60px; line-height:60px; text-align:left; margin-left:30px;FONT-SIZE:24px;color:#4B9CD8; font-weight:bold}
.mdiv2a_2{float:left;width:140px;height:60px; line-height:30px; text-align:left; FONT-SIZE:12px;color:#EFEFEF;}
.mdiv3{width:500px; padding:0;margin:0 auto;background-color:#ffffff;overflow:hidden;}
.mdiv3_a{float:left;width:420px;height:50px;}
.mdiv3_a1{float:left;width:100px;height:40px; line-height:32px; text-align:right}
.mdiv3_a2{float:left;width:320px;height:40px; line-height:40px; text-align:left}
.mdiv3_a2_1{float:left;width:140px;height:40px; line-height:40px; text-align:left}
.mdiv3_a2_2{float:left;width:180px;height:30px; line-height:30px; margin-top:3px; text-align:left}
.mdiv4_a{float:left;width:420px;height:30px;}
.mdiv5_a{float:right;height:20px; padding:20px;}
.input{
font-size:14px;COLOR:#666666; text-align:left;
height:30px;
line-height:30px;border-radius:3px;FONT-FAMILY:"Microsoft Yahei",Tahoma,Arial,Helvetica,STHeiti;
border:1px solid #bbbbbb;text-indent:10px; background-color:#fcfcfc;
}
.bt {
font-size:16px;FONT-FAMILY:"Microsoft Yahei",Tahoma,Arial,Helvetica,STHeiti;COLOR:#FFFFFF; text-align:center;
height:40px;
line-height:40px;
width:150px;
background-color:#7AC50F;
border:0px solid #FF3E3F;padding:0;border-radius:3px;
}
-->
</style></head>

<div class="mdiv1">
<div class="mdiv2">
<div class="mdiv2a">
<div class="mdiv2a_1">28娱乐系统管理后台
</div>
</div>
</div>
</div>
 <form>
<div class="mdiv3">
<div class="mdiv4_a"></div>
<div class="mdiv3_a">
<div class="mdiv3_a1">用户名&nbsp;&nbsp;</div>
<div class="mdiv3_a2"><input name="username" type="text" class="input" id="username" size="40" maxlength="20">
</div>
</div>
<div class="mdiv3_a">
<div class="mdiv3_a1">密&nbsp;&nbsp;&nbsp;码&nbsp;&nbsp;</div>
<div class="mdiv3_a2"><input name="userpsw" type="password" class="input" id="password" size="40" maxlength="40">
</div>
</div>
<div class="mdiv3_a">
<div class="mdiv3_a1">验证码&nbsp;&nbsp;</div>
<div class="mdiv3_a2_1"><input class="input" name="checkcode" id="vcode" type="text" value="" maxlength="7" size="16"></div>
<div class="mdiv3_a2_2"><img alt="看不清请点击更换" style="width:101px; height:40px;cursor:pointer;" src="vcode.php"  onclick="this.src='vcode.php?t='+ Math.round(Math.random() * 10000)" /></div>
</div>
<div class="mdiv3_a">
<div class="mdiv3_a1"></div>
<div class="mdiv3_a2"><input name="Submit" type="submit" class="bt" id="login" value="登录" style="cursor:pointer"></div>
</div>
</div>
</form>
<script type="text/javascript" language="javascript">
    $(document).ready(function() {
        $("#username").focus();
        $("#vcode").keydown(function(e){
            if(e.which == 13)
                $("#login").click(); 
        });
        $("#password").keydown(function(e){
            if(e.which == 13)
                $("#login").click(); 
        });
    });
    $("#login").click(function(){
        var username = $("#username").val();
        var pass = $("#password").val();
        var vcode = $("#vcode").val();
        if(username == "")
        {
            alert("请输入用户名!");
            $("#username").focus();
            return;
        }
        if(pass == "")
        {
            alert("请输入密码!");
            $("#password").focus();
            return;
        }
        if(vcode == "")
        {
            alert("请输入验证码!");
            return;
        }
        $.post("slogin.php?act=login",{username:username,pass:pass,vcode:vcode},function(ret){
            switch(ret)
            {
                case "0":
                    top.location.href = "index.php";
                    break;
                case "1":
                    alert("验证码错误!")
                    break;
                case "2":
                    alert("用户名或密码错误!");
                    break;
                    case "222":
                    alert("222");
                    break;
                default:
                    alert("未知错误!");
                    break;
            }
        });
    });
</script>



</body></html>